home *** CD-ROM | disk | FTP | other *** search
Makefile | 1996-08-20 | 6.0 KB | 243 lines | [TEXT/MPS ] |
- #
- # This MPW script builds the MacsBug Log dcmd and the display
- # application.
- # Copyright © 1992-94, Apple Computer Inc. All Rights Reserved.
- # 93.12.06 MM Revised for "AuditLib" reorganization.
- # 94.07.08 MM Revised for Universal Headers and Power PC native code.
- # 94.12.17 MM Revised for DriverLog (no 68000 application yet)
- # 94.01.21 MM Revised for DisplayLog, got dcmd working.
- # 95.03.31 MM Removed DisplayLog, using DumpLog only.
- # 95.05.26 MM Requires MPW 3.3 (PPCLink supports "-share globals", uses SC)
- #
- # Note that "DisplayLog" (no space) is the DCMD resource, while
- # "DumpLog" is the display application.
- #
- # (<CMD>/B: DisplayLog or DumpLog)
- #
- # Definitions
- # DCMD DCMD directory tree
- # DCMDIncludes Header files in DCMD tree
- # DCMDLibraries Object files in DCMD tree
- # PCICIncludes -> PCI header files (in Userstartup•PCI)
- # PCILibraries -> PCI system libraries (in Userstartup•PCI)
- #
- Creator = MAM1
- FileType = shlb
- CCompiler = C ## SC for MPW 3.3
-
- Src = ":Src:"
- DCMD = ":LogDCMDSrc:"
- Obj = ":Obj:"
- {Obj} ƒ {Src}
- #
- # PCICIncludes Defined by UserStartup•PCI in System Preferences
- # PCILibraries Defined by UserStartup•PCI in System Preferences
- #
- SymOpt = on
- PPCCOpt = off
- DCMDIncludes = "{DCMD}dcmd_Includes:"
- DCMDLibraries = "{DCMD}dcmd_Libraries:"
-
- #
- # Headers is slightly overkill, as it will rebuild the library even
- # if only the display routine changes.
- #
- Headers = ∂
- {Src}DumpLog.h ∂
- {Src}LogLibrary.h
-
- #
- # These files are compiled into a shared library.
- #
- LibraryObjPPC = ∂
- {Obj}LogLibrary.c.lib.po
-
- LibraryExports = ∂
- {Obj}LogLibrary.c.lib.x
-
- Objects = ∂
- {Obj}DumpLog.c.po ∂
- {Obj}DumpLogMain.c.po ∂
- {Obj}LogConvertTimestamp.c.po ∂
- {Obj}LogFormat.c.po ∂
- {Obj}LogFormatTimestamp.c.po ∂
- {Obj}MathLib64.c.po ∂
- {Obj}StatusWindow.c.po
-
- #
- # This does not include the dcmd itself.
- #
- DCMDObjects = ∂
- {Obj}LogConvertTimestamp.c.mo ∂
- {Obj}LogFormat.c.mo ∂
- {Obj}LogLibrary.c.mo ∂
- {Obj}MathLib64.c.mo
-
- #
- # Compiler dependencies -- common to all compilations The idea here
- # is that all sources are stored in a {...Src} subdirectory, and all
- # objects and code resources output by the linker are stored in the
- # {Obj} subdirectory.
- #
- .c.mo ƒ .c ∂
- {Headers}
- {CCompiler} {COptions} -mbg full -trace never -r ∂
- -d MPW ∂
- -d ISPPC=0 ∂
- -i "{PCICIncludes}" ∂
- -o {TargDir}{Default}.c.mo ∂
- {DepDir}{Default}.c
-
- .c.po ƒ .c ∂
- {Headers}
- PPCC -sym on -appleext on -w ∂
- -d MPW ∂
- -d ISPPC=1 ∂
- -i "{PCICIncludes}" ∂
- -o {TargDir}{Default}.c.po ∂
- {DepDir}{Default}.c
-
- .c.lib.po ƒ .c ∂
- {Headers}
- PPCC -sym on -appleext on -w ∂
- -d MPW ∂
- -d ISPPC=1 ∂
- -i "{PCICIncludes}" ∂
- -shared_lib_export on ∂
- -export_list {TargDir}{Default}.c.lib.x ∂
- -o {TargDir}{Default}.c.lib.po ∂
- {DepDir}{Default}.c
-
- #* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- #* Build LogLibrary shared library and copy the new
- #* library to the System Folder.
- #
- LogLibrary ƒ ∂
- MakeFile ∂
- {Src}LogLibrary.h ∂
- {LibraryObjPPC}
- PPCLink ∂
- {LibraryObjPPC} ∂
- "{PCILibraries}"DriverServicesLib ∂
- "{PCILibraries}"NameRegistryLib ∂
- -export `ConvertExportList {LibraryExports}` ∂
- -share global ∂
- -xm s ∂
- -t {FileType} ∂
- -c {Creator} ∂
- -o {targ}
-
- InstallLibrary ƒ ∂
- LogLibrary
- Duplicate ∂
- -y ∂
- LogLibrary ∂
- "{SystemFolder}Extensions:LogLibrary"
-
-
- #* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- #* Everything
- #*
- Everything ƒ ∂
- LogLibrary ∂
- MetroWerks ∂
- DisplayLog ∂
- DumpLog_MPW
- echo Done
-
- #* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- #* DumpLog
- #*
- DumpLog_MPW ƒƒ ∂
- MakeFile ∂
- {Headers} ∂
- LogLibrary ∂
- {Objects}
- PPCLink ∂
- {Objects} ∂
- "{PCILibraries}"DriverServicesLib ∂
- "{PPCLibraries}"InterfaceLib.xcoff ∂
- "{PPCLibraries}"PPCCRuntime.o ∂
- LogLibrary ∂
- -main main ∂
- -o "{Obj}"{targ}".xcoff"
- MakePEF ∂
- -l InterfaceLib.xcoff=InterfaceLib ∂
- -l DriverServicesLib.xcoff=DriverServicesLib ∂
- -l LogLibrary ∂
- -ft APPL ∂
- -o "{targ}" ∂
- "{Obj}"{targ}".xcoff"
-
- DumpLog_MPW ƒƒ ∂
- {Headers} ∂
- {Src}DumpLog.r
- Rez ∂
- -d "MPW=1" ∂
- -d "ISPPC=1" ∂
- -append ∂
- -t APPL ∂
- -i "{CIncludes}" ∂
- -i "{RIncludes}" ∂
- {Src}DumpLog.r ∂
- -o "{targ}"
-
-
- #* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- #* Build the DCMD - the name is the name that will be used
- #* by MacsBug. Note, for some reason, the Rez statement
- #* often fails, so you have to put the dcmd resource
- #* into the Debugger Prefs file by hand.
- #*
- DisplayLog ƒ ∂
- Makefile ∂
- ## LogLibrary ∂
- {DCMDObjects} ∂
- {Obj}LogDCMD.c.mo
- Link ∂
- -o {targ} ∂
- -c RSED ∂
- -t rsrc ∂
- "{DCMDLibraries}"dcmdGlue.a.o ∂
- {Obj}LogDCMD.c.mo ∂
- {DCMDObjects} ∂
- "{Libraries}"Runtime.o ∂
- "{Libraries}"Interface.o
- {DCMD}BuildDcmd {targ} 20000
-
- Install ƒ ∂
- DisplayLog
- Echo 'include "DisplayLog"' "'dcmd' (20000);" ∂
- | Rez -a -o "{SystemFolder}Debugger Prefs"
-
- "{Obj}"LogDCMD.c.mo ƒ ∂
- "{DCMD}"LogDCMD.c ∂
- {Headers}
- C {COptions} -mbg full -trace never -r ∂
- -d MPW ∂
- -d ISPPC=0 ∂
- -i "{DCMDIncludes}" ∂
- -i "{PCICIncludes}" ∂
- -o "{Obj}"LogDCMD.c.mo ∂
- "{DCMD}"LogDCMD.c
-
- #* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- #*
- #* Build the MetroWerks resources
- #*
- MetroWerks ƒ ∂
- "DumpLog.Δ.rsrc"
- echo "MetroWerks resources created"
- "DumpLog.Δ.rsrc" ƒ ∂
- MakeFile ∂
- {Headers} ∂
- {Src}DumpLog.r
- Rez ∂
- {Src}DumpLog.r ∂
- -d "ISPPC=1" ∂
- -t rsrc ∂
- -c RSED ∂
- -i "{CIncludes}" ∂
- -i "{RIncludes}" ∂
- -o {targ}
-